通过协议号查询签约
商户通过签约协议号可查询签约信息,如果对应签约状态为“已签约”,返回签约信息,如果对应签约状态为“已解约”,返回明确错误码
请求参数 | 类型 | 描述 |
---|---|---|
contract_id | string | 签约协议号 |
query | object | 声明请求的查询参数 |
appid | string | 服务商APPID |
sub_mchid | string | 子商户号 |
sub_appid | string | 子商户APPID |
php
$instance->v3->eduPapay->contracts->id->_contract_id_->getAsync([
'contract_id' => 'wx998877665544wx',
'query' => [
'appid' => 'wx8888888888888888',
'sub_mchid' => '1900000109',
'sub_appid' => 'wx8888888888888888',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/edu-papay/contracts/id/{contract_id}')->getAsync([
'contract_id' => 'wx998877665544wx',
'query' => [
'appid' => 'wx8888888888888888',
'sub_mchid' => '1900000109',
'sub_appid' => 'wx8888888888888888',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/edu-papay/contracts/id/{contract_id}']->getAsync([
'contract_id' => 'wx998877665544wx',
'query' => [
'appid' => 'wx8888888888888888',
'sub_mchid' => '1900000109',
'sub_appid' => 'wx8888888888888888',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->eduPapay->contracts->id->_contract_id_->get([
'contract_id' => 'wx998877665544wx',
'query' => [
'appid' => 'wx8888888888888888',
'sub_mchid' => '1900000109',
'sub_appid' => 'wx8888888888888888',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/edu-papay/contracts/id/{contract_id}')->get([
'contract_id' => 'wx998877665544wx',
'query' => [
'appid' => 'wx8888888888888888',
'sub_mchid' => '1900000109',
'sub_appid' => 'wx8888888888888888',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/edu-papay/contracts/id/{contract_id}']->get([
'contract_id' => 'wx998877665544wx',
'query' => [
'appid' => 'wx8888888888888888',
'sub_mchid' => '1900000109',
'sub_appid' => 'wx8888888888888888',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sp_mchid | string | 服务商商户号 |
appid | string | 服务商APPID |
sub_mchid | string | 子商户号 |
sub_appid | string | 子商户APPID |
openid | string | 服务商APPID下的用户标识 |
sub_openid | string | 子商户APPID下的用户标识 |
plan_id | string | 签约模板号 |
contract_information | object | 签约信息 |
contract_id | string | 签约协议号 |
contract_status | string | 签约状态 |
create_time | string | 签约时间 |
参阅 官方文档